/* map_grid.h */

#ifndef DODO_MAP_GRID_H
#define DODO_MAP_GRID_H

#include <cmath>
#include <list>
#include <vector>

#include <dodo_plot/kernel/plotfwd.h>
#include <dodo_plot/kernel/basic_elements.h>
#include <dodo_plot/kernel/canvas.h>
#include <dodo_plot/kernel/plotter.h>

#include <dodo_plot/map/map_utils.h>

namespace dodo_plot
{

template <class Proj_T>
class Map_Grid
{
public:
	void draw(const Plotter& plotter) const;
	double height() const;
	double width() const;
	Position local_pos() const;
public:
	Map_Grid(
		const Proj_T& map_proj,
		double lon_interval, 
		double lat_interval,
		double min_lon, double max_lon,
		double min_lat, double max_lat,
		double ref_lon, double ref_lat
		);
	
public:
	void set_line_width(double t) { line_width_ = t; } 
	void set_line_color(const Color& c) { line_color_ = c; }

private:

	Proj_T map_proj_;
	double lon_interval_;
	double lat_interval_;
	double min_lon_;
	double max_lon_;
	double min_lat_;
	double max_lat_;
	double ref_lon_;
	double ref_lat_;

	double line_width_;
	Color line_color_;
};

}
#include <dodo_plot/map/map_grid.tcc>

#endif //DODO_MAP_GRID_H

